1. Field of the Invention
The present invention relates to an image processing method and apparatus by which an edit process is performed on an image for a particular area specified by a user, and an image processing operation during the operation of generating an image is switched in synchronization with the output of a bit-map memory in which a processing area is generated beforehand. The present invention also relates to a storage medium for use with such an image processing method and apparatus.
2. Description of the Related Art
A widely-used technique for a user to tell a copying machine which area should be edited is to specify an area using a pointing device such as a digitizer or to specify an area by writing a point or a closed curve on a document with a marker.
The information about the point or closed curve given via the pointing device or the marker is written into a memory via an image sensing device such as a CCD (charge-coupled device) or data representing such information is stored in a memory by a CPU at an address corresponding to the specified location on the document. The area is then expanded to the boundary or edge of a particular pattern area using an area generator IC (integrated circuit) and thus the area to be edited is finally defined.
FIGS. 35-38 are schematic diagrams illustrating the process of shading the edit area defined in the above-described manner.
FIG. 35 illustrates an example of a printing operation performed on a particular edit area specified by a single point given by a marker. More specifically, a closed area 3502 of a document is specified as an edit area by writing a point 3501 inside the area 3502 with a digitizer as shown in FIG. 35a, and the image of the document is sensed via a CCD. FIG. 35b illustrates a printed result corresponding to FIG. 35a. As can be seen from FIG. 35, the particular area specified as the edit area by writing the point 3501 inside the area 3502 as shown in FIG. 35a is expanded to the entire area 3503 corresponding to the inner area 3502, and the expanded area 3503 is shaded as shown in FIG. 35b.
FIG. 36a illustrates a document in which a particular area is specified as an edit area 3602 by a closed curve 3601 drawn by a marker, and which is to be sensed via a CCD. FIG. 36b illustrates a printed result corresponding to FIG. 36a. In this case, as shown in FIG. 36, the circular area 3602 surrounded by the closed curve 3601 shown in FIG. 36a is specified as an edit area, and this specified area is shaded as shown in FIG. 36b.
FIG. 37 illustrates an example of a printing operation performed on a particular edit area specified by a single point written via a digitizer. More specifically, an area 3702 of a document is specified as an edit area by writing a point 3701 inside the area 3702 with a digitizer as shown in FIG. 37a, and the document is sensed via the CCD. FIG. 37b illustrates a printed result corresponding to FIG. 37a. As can be seen from FIG. 37, the particular area is specified as an edit area by writing the point 3701 inside the area 3702 as shown in FIG. 37a, and then the point is expanded to an area 3703 corresponding to the entire inner area 3702, and the expanded area 3703 is shaded as shown in FIG. 37b.
FIG. 38 illustrates an example of a printing operation performed on a particular edit area specified by two points written via a digitizer. More specifically, an edit area of a document is defined by the locations of two points 3801-1 and 3801-2 as shown in FIG. 38a, and the document is sensed via the CCD. FIG. 38b illustrates a printed result corresponding to FIG. 38a. As shown in FIG. 38, the particular edit area in the form of a rectangle whose diagonal is defined by the two points 3801-1 and 3801-2 shown in FIG. 38a is shaded as shown in FIG. 38b.
The area expansion process from a point (points) or a curve written with a marker or a digitizer to a final edit area should be performed before a printer section starts a printing operation. That is, in a copying operation, a document is sensed via the CCD, and obtained image data (boundary data) and data representing an edit area specified with a marker or the digitizer are stored in a memory. Then edit area expanding process is performed on the data stored in the memory as shown in FIGS. 35-38. After the edit area expansion process, the document is sensed again via the CCD wherein the image data of the edit area stored in the memory is also read out in synchronization with the operation of sensing the document so that an editing process such as coloring is performed on the particular part of the document corresponding to the specified edit area.
In the above technique, if the image data of the entire page of a document and the data representing an edit area specified by a marker or the digitizer are stored in the memory, the memory has to have a great capacity. This causes an increase in cost. Furthermore, the edit area expansion takes a long time, and thus a long time is needed to perform a copying operation.
One common technique to avoid the above problems is to compress (or thin) the image data before storing it into a memory so as to reduce the amount of data to be stored in the memory. When data is read from the memory, interpolation is performed so as to obtain data corresponding to the original image data, and an editing operation is performed on the data obtained via the interpolation process.
FIG. 39 illustrates a specific example of the data compression technique. In FIG. 39, flip-flops (F/Fs) 3901a-39011 cause the input image data to have a delay corresponding to one pixel in the direction (main scanning direction) in which the CCD senses the image data. One-line delay circuits 3902a-3902c store one line of image data sensed in the main scanning direction and output the stored image data so that the output image data has a delay corresponding to one line in a direction (sub-scanning direction) perpendicular to the main scanning direction of the CCD. An OR gate 3903 performs an OR operation on input data associated with 16 lines and outputs a resultant signal. A timing control circuit 3904 outputs an enable signal so that one pixel is enabled every four pixels and one line is enabled every four lines. In response to an enable signal output from the timing control circuit 3904, a flip-flop (F/F) 3905 with an enable terminal (ENB) 3905 a gets output data of the OR gate 3903 and outputs the obtained data.
With the arrangement described above, the data reduction block shown in FIG. 39 performs an OR operation on the 4 lines.times.4 pixels image data and outputs a resultant data to the memory. That is, 4.times.4 pixel data is reduced to 1-pixel data and thus the amount of data is reduced to 1/16.
The data which has been reduced by the process described above in conjunction with FIG. 39 may be expanded for example using 4.times.4 interpolation by means of a pattern matching operation as shown in FIG. 40. In FIG. 40, the data output from the memory is given to the respective locations a, b, c, d, e, f, g, h, and i. Then the values for neighboring pixels around e are calculated using the values of other pixels by means of interpolation according to the equations shown in FIG. 40. For example, the value for a pixel located above and on the left of the pixel e is determined in such a manner that the value of the pixel d is employed as the value of the pixel of interest when all the values of the pixels a, b, d, and g are equal, while the value of either d or e which is greater than the other is employed when the values of pixels a, b, and d are equal.
FIG. 41 illustrates an example of an edit area signal obtained by performing data reduction on an input image data using the technique described above in conjunction with FIG. 39 and further performing data interpolation illustrated in FIG. 40 thereby expanding the edit area. In this figure, (a) illustrates an original image, (b) image data of document, (c) image data of document after subjected to data reduction (and stored in memory), (d) marker signal data, (e) marker signal data after subjected to data reduction (and stored in memory), (f) and (g) a marker area determined on the basis of the reduced image data of the document and the reduced data of marker signal, (h) interpolation process according to the technique shown in FIG. 40, and (i) printed result.
In the above technique, because data reduction is performed on the input data before it is stored in the memory and then interpolation is performed on the data expanded to the edit area on the memory as described above in conjunction with FIGS. 39 and 40, a gap (white gap) is produced between the edit area and the boundary line (represented by a black line) on the document as shown in FIG. 41i, and thus the editing process is not performed for all the area inside the boundary. The above problem is particularly serious when the boundary line to be printed is black.
In the conventional technique described above, the area memory used in the editing process requires as large a capacity as 400 Mbytes to process an A3-size image with a resolution of 400 dpi, and the required memory capacity increases with the number of edit areas. To reduce the memory capacity, the area is generated so that it has a lower resolution than the original image signal. However, the image becomes rough particularly in slanted lines compared with the original image. Furthermore, in the case where a particular area of an input image surrounded by a closed curve is filled with a color, fine structures such as thin lines or narrow gaps cannot be represented because of the poor resolution of the image store in the memory.